package com.tgpms.interfaces.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author eve
 * <p>
 * 初始化 IP 和 端口
 */
@Component
@ConfigurationProperties(prefix = "portal")
public class PortalProperties {

    /**
     * 访问地址
     */
    public static String url;
    /**
     * clientId
     **/
    public static String clientId;
    /**
     * clientSecret
     **/
    public static String clientSecret;

    /**
     * clientSecret
     **/
    public static String grantType;


    @Value("${portal.url}")
    public void setUrl(String url) {
        PortalProperties.url = url;
    }
    
    @Value("${portal.clientId}")
    public void setClientId(String clientId) {
    	PortalProperties.clientId = clientId;
    }

    @Value("${portal.clientSecret}")
    public void setClientSecret(String clientSecret) {
        PortalProperties.clientSecret = clientSecret;
    }

    @Value("${portal.grantType}")
    public void setGrantType(String grantType) {
        PortalProperties.grantType = grantType;
    }

}
